#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QHash>
class QTcpServer;
class QTcpSocket;

QT_BEGIN_NAMESPACE
namespace Ui {
class MainWindow;
}
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    QTcpServer *tcpServer;
    QTcpSocket *tcpSocket=nullptr;
    quint16 loginPort=8888;

    void InitAll();
    void InitTCP();
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

private slots:
    void on_actionClear_triggered();
    void do_newConnection();
    void do_readyRead();
private:
    Ui::MainWindow *ui;
};
#endif // MAINWINDOW_H
